package com.shengdong.water.code.adapter

import com.shengdong.water.R
import com.shengdong.water.code.base.BaseRecyclerAdapter
import com.shengdong.water.code.ext.loadRoundedImage
import com.shengdong.water.databinding.ItemImageGridBinding

class ImageGridAdapter: BaseRecyclerAdapter<String, ItemImageGridBinding>() {

    override fun getLayoutId() = R.layout.item_image_grid

    override fun bindData(binding: ItemImageGridBinding, data: String, position: Int) {
//        binding.item = item

        // 可以在这里添加额外的绑定逻辑
        binding.itemImage.loadRoundedImage(data, radius = 5f)

        binding.executePendingBindings()
    }
}